import { createRouter, createWebHistory } from "vue-router";

import Login from "../views/login/index.vue";

import Home from "../views/home/index.vue";
import HomeBody from "../views/home/components/body.vue";
import Profile from "@/views/home/components/profile.vue";

import Become from "../views/become/index.vue";
import Contact from "../views/contact/index.vue";
import Instagram from "../views/instagram/index.vue";
import Models from "../views/models/index.vue"

import Back from "../views/back/index.vue";

import BackHome from "../views/back/home/index.vue";
import BackModels from "../views/back/models/index.vue";
import BackAbout from "../views/back/about/index.vue";
import BackProfile from "../views/back/profile/index.vue";

import ModelsProfile from "../views/back/components/profile.vue"

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: "/login",
      component: Login,
    },
    {
      path: "/back",
      component: Back,
      redirect:"/back/home",
      children: [
        { path: "home", component: BackHome },
        { path: "models", component: BackModels },
        {path:"models/:id",component:ModelsProfile},
        { path: "about", component: BackAbout },
        { path: "profile", component: BackProfile },
      ],
    },
    {
      path: "/",
      component: Home,
      redirect: "home",
      children: [
        { path: "home", component: HomeBody },
        {path:"models",component:Models},
        { path: "profile/:id", component: Profile },
        { path: "become", component: Become },
        { path: "instagram", component: Instagram },
        { path: "contact", component: Contact },
      ],
    },
  ],
});

export default router;
